package com.nwpu.intimacy.user;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.ImageView;

import com.nwpu.intimacy.R;
import com.nwpu.intimacy.utils.CacheUtil;

public class QRCodeActivity extends Activity {

	private SharedPreferences sp_userMessage;

	private ImageView imageView;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_scancode);

		sp_userMessage = this.getSharedPreferences("userMessage",
				Context.MODE_PRIVATE);

		Bitmap bitmap = CacheUtil.GetFromFile("QRCode", "QRCode");

		imageView = (ImageView) findViewById(R.id.scan_code);

		Drawable drawable = new BitmapDrawable(bitmap);

		imageView.setImageDrawable(drawable);

	}

}
